]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
theme: Don't draw border around symbolic user-icon
authorJoonas Henriksson <joonas.henriksson@gmail.com>
Sun, 1 Nov 2020 12:40:47 +0000 (14:40 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 17 Dec 2020 20:46:41 +0000 (21:46 +0100)
Recent commit [1] added a strong light border around user avatar
icons, in accordance with design mockups.

As a probably unintentional side-effect, the border was also added
around the symbolic fallback icon, which is displayed whenever the
user avatar is not available. This doesn't work well with the current
design, as the strong border makes the subtle fallback icon
background indistinguishable. Additionally, it doesn't match the
design mockups for the symbolic avatar icon [2].

Correct this by adding a style class for when avatar image is used,
and apply the border only for that case.

[1] https://gitlab.gnome.org/GNOME/gnome-shell/-/commit/498710c2ec4ea2b3297703a0e9a2ad1168c765aa
[2] https://gitlab.gnome.org/Teams/Design/os-mockups/-/blob/master/lock-login/username-based-login.png

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1490>

data/theme/gnome-shell-sass/widgets/_misc.scss
js/ui/userWidget.js

index b2f22fc71ab9608231f6b4276be3d8e8f3e0c3f9..1029c3e1ddd2f00b498308953951e5567245c648 100644 (file)
@@ -9,7 +9,6 @@
   background-size: contain;
   color: $osd_fg_color;
   border-radius: 99px;
-  border: 2px $osd_fg_color;
   icon-size: $base_icon_size * 4; // 64px
   &:hover {
     color: lighten($osd_fg_color,30%);
     padding: $base_padding * 2 ; // 12px
     width: $base_icon_size * 2.5; height:  $base_icon_size * 2.5; // 40px;
   }
+
+  &.user-avatar {
+    border: 2px $osd_fg_color;
+  }
 }
 
 .user-widget.vertical .user-icon {
index 40bf59df9b5856cbd47e55405b6c599a0e9a5370..c376028af307f63f70fa3f9751d1c1717545905f 100644 (file)
@@ -90,6 +90,7 @@ class Avatar extends St.Bin {
 
         if (iconFile) {
             this.child = null;
+            this.add_style_class_name('user-avatar');
             this.style = `
                 background-image: url("${iconFile}");
                 background-size: cover;`;